"""
text 文本控件，用于显示多行文本
"""
import tkinter
win=tkinter.Tk()
win.title("text控件")
#win.geometry("500x400+100+200")

scroll=tkinter.Scrollbar()
text1=tkinter.Text(win,width=50,height=3)# height 显示的行数
#  滚动条 放右侧并且填充满
scroll.pack(side=tkinter.RIGHT,fill=tkinter.Y)
#文本框靠左侧 并且填充满
text1.pack(side=tkinter.LEFT,fill=tkinter.Y)
#关联
scroll.config(command=text1.yview)
text1.config(yscrollcommand=scroll.set)

str="""
     sunck is a good man
      sunck is a fuck man
       sunck is a hate man
        sunck is a nice man
         sunck is a bad man
          sunck is a super man
          Every single time you access a website, you leave tracks. Tracks that others can access. If you don't like the idea, find out what software can help you cover them.
Anti Tracks
Anti Tracks is a complete solution to protect your privacy and enhance your PC performance. With a simple click Anti Tracks securely erase your internet tracks, computer activities and programs history information stored in many hidden files on your computer.Anti Tracks support Internet Explorer, AOL, Netscape/Mozilla and Opera browsers. It also include more than 85 free plug-ins to extend erasing features to support popular programs such as ACDSee, Acrobat Reader, KaZaA, PowerDVD, WinZip, iMesh, Winamp and much more. Also you can easily schedule erasing tasks at specific time intervals or at Windows stat-up/ shutdown.To ensure maximum privacy protection Anti Tracks implements the US Department of Defense DOD 5220.22-M, Gutmann and NSA secure erasing methods, making any erased files unrecoverable even when using advanced recovery tools.

    """
text1.insert(tkinter.INSERT,str)
text1.pack()
win.mainloop()

